package com.chixing.day07_abstract.prototype;

public class Company {
    // 属性
    private int companyId;
    private String companyName;
    private String companyType;
    private String companyAddress;
    private long companyTelno;
    public Company(){}
    public Company(int companyId, String companyName, String companyType, String companyAddress, long companyTelno) {
        this.companyId = companyId;
        this.companyName = companyName;
        this.companyType = companyType;
        this.companyAddress = companyAddress;
        this.companyTelno = companyTelno;
    }

    public int getCompanyId() {
        return companyId;
    }

    public void setCompanyId(int companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCompanyType() {
        return companyType;
    }

    public void setCompanyType(String companyType) {
        this.companyType = companyType;
    }

    public String getCompanyAddress() {
        return companyAddress;
    }

    public void setCompanyAddress(String companyAddress) {
        this.companyAddress = companyAddress;
    }

    public long getCompanyTelno() {
        return companyTelno;
    }

    public void setCompanyTelno(long companyTelno) {
        this.companyTelno = companyTelno;
    }

    @Override
    protected Company clone() throws CloneNotSupportedException {
        Company clone = new Company();
        clone.companyId = this.companyId;
        clone.companyName = this.companyName;
        clone.companyTelno = this.companyTelno;
        clone.companyType = this.companyType;
        clone.companyAddress = this.companyAddress;
        return clone;
    }

    @Override
    public String toString() {
        return "Company{" +
                "companyId=" + companyId +
                ", companyName='" + companyName + '\'' +
                ", companyType='" + companyType + '\'' +
                ", companyAddress='" + companyAddress + '\'' +
                ", companyTelno=" + companyTelno +
                '}';
    }
}
